package com.cloudkinto.service.zone;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.ZoneTempDo;
import com.cloudkinto.vo.ft.FreightStatusUpdateReq;
import com.cloudkinto.vo.zone.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 分区规则 service接口
 * </p>
 *
 * @author hua
 * @since 2024-11-01
 */
public interface ZoneTempService extends IService<ZoneTempDo> {

    SingleResult addInit();

    String checkPostCode(String startPostCode, String endPostCode);

    Object add(ZoneTempAddReq req, Long userId, Long tenantId);

    SingleResult updateInit(Long id);

    Object update(ZoneTempUpdateReq updateVo, Long userId, Long tenantId);

    int delete(Long id, Long userId, Long tenantId);

    ZoneTempDetailRes detail(Long id);

    SingleResult pageInit();

    List<ZoneTempPageRes> getList(Map<String, String> map);

    PageResult getListPage(Map<String, String> map);

    /**
     * 校验分区规则
     * @param zoneType freight 物流费
     * @return
     */
    ZoneTempTestRes testZone(Long thirdId, String countryCode, String postcode, String zoneType);

    ZoneTempTestRes testZone(Map<String, String> map);

    boolean jugPostCode(String postCode, String startPostCode, String endPostCode);

    PostCodeRes getPostCode(String startPost, String endPost, Map<String, String> zimuMap);

    Map<String, String> getZimuMap();

    ZoneTempImportRes importT(MultipartFile file);

    void updateStatus(FreightStatusUpdateReq req, Long userId, Long tenantId);

}
